-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First step towards replace_all
operations
#209
Conversation
Results:
|
replace_all
operations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I do not fully grasp the way replace_all*
are handled.
// create equation for propagating length constraints | ||
// tmp = replace_all(...) => |tmp| = |replace_all(...)| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is confusing for me, aren't we adding this equation so we can work with the variable tmp
inside the procedure? Like every other equation we create in handlers? This seems like the only reason is the lenghts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, yes but. The main reason for the equalities is the length axiom adding. The mapping tmp -> replace_all(...) is stored separately as for the other string functions. In the final check we traverse all equalitions and recursively extract calls of replace_all and replacing them with the tmp variables. But these replacements are steered only by the function symbol mapping filled in handle_replace_all
(and other such functions).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it just seems weird to add such a comment here but not in other handlers (at least I feel there is something else in other handlers, am I wrong?). It seems from the comment like replace_all*
have some special handling, which from the way I understood is true, but in a different way. But I do not fully understand what is happening with creating transducers, so maybe this comment makes sense here.
Co-authored-by: Juraj Síč <[email protected]>
Co-authored-by: Juraj Síč <[email protected]>
Co-authored-by: Juraj Síč <[email protected]>
This PR is a first step towards handling transducer constraints (
replace_all
,replace_re_all
). In particular:Predicate
classreplace_all
andreplace_re_all
into an input formula for decision procedures